#ifndef CCHAT_H
#define CCHAT_H

#include <QObject>

#include "CNetwork.h"
#include "CLog.h"

class CChat : public QObject
{
    Q_OBJECT
    private:
        CNetwork *c_network;
    public:
        CChat();
        ~CChat();

        CNetwork* get_network();

    signals:
        void new_client(QString);
        void receive_message(QString);
        void disconnect(QString);

    public slots:
        void new_client(QTcpSocket* destinataire);
        bool start(quint16 port);
        void receive_chat(QTcpSocket* socket);
        void disconnect_chat(QTcpSocket* socket);
};

#endif // CCHAT_H
